package com.harth.blemultiplatform.ble.core


/**
 * Primary PHY for an advertisement.
 *
 * The primary PHY of an advertisement can only be LE 1M, for regular advertisement,
 * or LE Coded for long range applications.
 * @see [Phy]
 */
enum class PrimaryPhy {

    /**
     * Bluetooth LE 1M PHY.
     *
     * Used to refer to LE 1M Physical Channel for advertising, scanning or connection.
     */
    PHY_LE_1M,

    /**
     * Bluetooth LE Coded PHY.
     *
     * Used to refer to LE Coded Physical Channel for advertising, scanning or connection.
     */
    PHY_LE_CODED;

    override fun toString(): String = when (this) {
        PHY_LE_1M -> "LE 1M"
        PHY_LE_CODED -> "LE Coded"
    }
}